package com.ruoyi.production.service.impl.graftinglabel;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.graftinglabel.GraftinglabelPurchaseApply;
import com.ruoyi.production.mapper.graftinglabel.GraftinglabelPurchaseApplyMapper;
import com.ruoyi.production.service.graftinglabel.IGraftinglabelPurchaseApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 嫁接签购买申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class GraftinglabelPurchaseApplyServiceImpl implements IGraftinglabelPurchaseApplyService
{
    @Autowired
    private GraftinglabelPurchaseApplyMapper graftinglabelPurchaseApplyMapper;

    /**
     * 查询嫁接签购买申请
     *
     * @param graftinglabel PurchaseApplyId 嫁接签购买申请ID
     * @return 嫁接签购买申请
     */
    @Override
    public GraftinglabelPurchaseApply selectGraftinglabelPurchaseApplyById(Long graftinglabelPurchaseApplyId)
    {
        return graftinglabelPurchaseApplyMapper.selectGraftinglabelPurchaseApplyById(graftinglabelPurchaseApplyId);
    }

    /**
     * 查询嫁接签购买申请列表
     *
     * @param graftinglabelPurchaseApply 嫁接签购买申请
     * @return 嫁接签购买申请
     */
    @Override
    public List<GraftinglabelPurchaseApply> selectGraftinglabelPurchaseApplyList(GraftinglabelPurchaseApply graftinglabelPurchaseApply)
    {
        return graftinglabelPurchaseApplyMapper.selectGraftinglabelPurchaseApplyList(graftinglabelPurchaseApply);
    }

    /**
     * 新增嫁接签购买申请
     *
     * @param graftinglabelPurchaseApply 嫁接签购买申请
     * @return 结果
     */
    @Override
    public int insertGraftinglabelPurchaseApply(GraftinglabelPurchaseApply graftinglabelPurchaseApply)
    {
        graftinglabelPurchaseApply.setCreateTime(DateUtils.getNowDate());
        return graftinglabelPurchaseApplyMapper.insertGraftinglabelPurchaseApply(graftinglabelPurchaseApply);
    }

    /**
     * 修改嫁接签购买申请
     *
     * @param graftinglabelPurchaseApply 嫁接签购买申请
     * @return 结果
     */
    @Override
    public int updateGraftinglabelPurchaseApply(GraftinglabelPurchaseApply graftinglabelPurchaseApply)
    {
        graftinglabelPurchaseApply.setUpdateTime(DateUtils.getNowDate());
        return graftinglabelPurchaseApplyMapper.updateGraftinglabelPurchaseApply(graftinglabelPurchaseApply);
    }

    /**
     * 批量删除嫁接签购买申请
     *
     * @param graftinglabel PurchaseApplyIds 需要删除的嫁接签购买申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelPurchaseApplyByIds(Long[] graftinglabelPurchaseApplyIds)
    {
        return graftinglabelPurchaseApplyMapper.deleteGraftinglabelPurchaseApplyByIds(graftinglabelPurchaseApplyIds);
    }

    /**
     * 删除嫁接签购买申请信息
     *
     * @param graftinglabel PurchaseApplyId 嫁接签购买申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelPurchaseApplyById(Long graftinglabelPurchaseApplyId)
    {
        return graftinglabelPurchaseApplyMapper.deleteGraftinglabelPurchaseApplyById(graftinglabelPurchaseApplyId);
    }
}
